package com.coc.prototype;

import java.io.IOException;

public class ProtoTest {

	public static void main(String[] args) throws CloneNotSupportedException, ClassNotFoundException, IOException {
		
		Prototype p = new Prototype();
		p.setName("狄仁杰");
		
		Prototype clone = (Prototype) p.clone();
	//	p.setName("李元芳");
		
		Prototype deepClone = (Prototype) p.deepClone();
	//	deepClone.setName("蝮蛇");
		p.setName("李元芳");
		
		
		System.out.println("原        ： "+ p.getName());
		System.out.println("浅拷贝 ： " + clone.getName());
		System.out.println("深拷贝 ： " + deepClone.getName());
		
	}
}
